package com.linkoog.devtools.http.document.markdown;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.LangDataKeys;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.linkoog.devtools.http.raw_index.HttpServiceMethod;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;

public class MarkdownExportAction extends AnAction {

    private final HttpServiceMethod httpServiceMethod;

    public MarkdownExportAction(@NotNull HttpServiceMethod httpServiceMethod, @NotNull String text, String description, Icon icon) {
        super(text, description, icon);
        this.httpServiceMethod = httpServiceMethod;
    }

    @Override
    public void actionPerformed(@NotNull AnActionEvent e) {
        Project project = e.getData(CommonDataKeys.PROJECT);
        if (project == null){
            return;
        }

        Module module = e.getData(LangDataKeys.MODULE);
        if (module == null){
            return;
        }

        //对话框
        /*MarkdownExportDialog dialog = new MarkdownExportDialog(httpServiceMethod, project);
        dialog.showAndGet();*/
    }



}
